/* 通用设置 */
:root {
  --brand-primary: #0b1c7e;
  --brand-surface: #f8fbff;
  --brand-accent: #e9efff;
  --text-main: #1f2937;
  --text-muted: #64748b;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.75;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  color: var(--text-main);
}

/* 容器 */
main {
  max-width: 820px;
  margin: 20px auto;
  padding: 24px;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(11, 28, 126, 0.08);
}

.article-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  max-width: 1080px;
}

.article-content {
  min-width: 0;
}

.article-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.article-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 12px;
  background: var(--brand-surface);
}

.article-toc h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.article-toc ul,
.article-toc ol {
  padding-left: 0;
}

.article-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li {
  margin: 0;
}

.article-toc a {
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--brand-primary);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  z-index: 99;
}

.reading-progress-inner {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand-primary);
}

/* 标题 */
h1 {
  font-size: 2rem;
  color: var(--brand-primary);
  margin-bottom: 0;
  text-align: center;
}

h2,
h3 {
  margin-top: 20px;
  color: #334155;
}

/* 时间信息 */
p.date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: var(--brand-accent);
}

/* 封面照片 */
.blog-cover-wrapper {
  text-align: center;
  margin-bottom: 20px;
}

.blog-cover {
  max-width: 85%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(11, 28, 126, 0.15);
}

/* 段落 */
p {
  margin-bottom: 20px;
}

/* 引用 */
blockquote {
  margin: 20px 0;
  padding: 15px;
  background-color: #f1f5ff;
  border-left: 5px solid var(--brand-primary);
  font-style: italic;
}

/* 图片 */
img {
  max-width: 100%;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 列表 */
ul,
ol {
  margin: 20px 0;
  padding-left: 40px;
}

li {
  margin-bottom: 10px;
}

/* 链接 */
a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 页脚 */
footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 980px) {
  .article-main {
    display: block;
  }

  .article-toc {
    position: static;
    margin-bottom: 16px;
  }
}
